home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4405 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  860 b 

  1. Path: gail.ripco.com!mambuhl
  2. From: mambuhl@ripco.com (Martin Ambuhl)
  3. Newsgroups: comp.lang.c
  4. Subject: #define, question from a
  5. Date: 4 Feb 1996 05:37:40 GMT
  6. Organization: Ripco Communications, Inc.
  7. Message-ID: <4f1gn4$kv5@gail.ripco.com>
  8. NNTP-Posting-Host: golden.ripco.com
  9.  
  10. ma@maths.uwa.edu.au (ma) in <ma-010296161301@mac147.maths.uwa.edu.au>
  11. asked, basically whether he could create a multi-line macro.
  12.  
  13. The answer, clearly, is to use the \ line continuation
  14. (The C++ // comments, which are syntax errors in comp.lang.c are replaced.)
  15.  
  16. #define fiveLines  printf("%d, ",j); /* macro should include this line */ \
  17.     /* some more lines */ \
  18.      printf("%d",k); /* macro should include this last line */
  19.  
  20.                                                                                 
  21. --
  22. * Martin Ambuhl       net: mambuhl@ripco.com
  23. * Chicago, IL (USA)    
  24.